<template>
    <div class="item-info">
        <div class="item-icon">
            <img :src="good.img" alt=""/>
        </div>
        <div class="item-detail">
            <div class="left">
                <div class="title">{{ good.name }}</div>
                <div class="type">规格：{{ good.spec }}</div>
            </div>
            <div class="price_number">
                <div class="price">￥{{ good.price }}</div>
                <div class="number">x{{ good.number }}</div>
            </div>
        </div>
    </div>
</template>

<script>
    export default {
        props: ["good"]
    };
</script>

<style lang="less" scoped>
    .item-info {
        padding: 0.48rem;
        display: flex;
        font-size: 0.56rem;

        .item-icon {
            width: 3.36rem;
            height: 3.36rem;
            margin-right: 0.48rem;
            background: #dfdfdf;
            overflow: hidden;
            border-radius: 0.12rem;

            img {
                width: 100%;
                height: 100%;
            }
        }

        .item-detail {
            width: calc(100% - 3.84rem);
            position: relative;
            display: flex;
            justify-content: space-between;

            .left {
                max-width: 70%;

                .title {
                    overflow: hidden;
                    text-overflow: ellipsis;
                    display: -webkit-box;
                    -webkit-line-clamp: 2;
                    -webkit-box-orient: vertical;
                    white-space: normal;
                }
            }

            .type {
                color: rgba(153, 153, 153, 1);
                margin-top: 0.5rem;
            }

            .price_number {
                text-align: right;
                line-height: 0.8rem;
                // .price {
                // }
                .number {
                    color: #999999;
                }
            }
        }
    }
</style>
